package com.srv.pojo;

import java.io.Serializable;

/*@Entity
@Table(name = "estado")
@NamedQueries(value = {
		@NamedQuery(name = "Estado.getListaEstados", query = "SELECT e FROM Estado e"),
		@NamedQuery(name = "Estado.getEstadoByEscode", query = "SELECT e FROM Estado e WHERE e.escode = :escode")
})*/
public class Estado implements Serializable{

	private static final long serialVersionUID = -8991406298151996181L;

	/*@Id
	@Column(name="escode")
	@OneToMany(mappedBy="estado")*/
	private int escode;

	/*@Column(name="sigla", nullable=false, length=2)*/
	private String sigla;
	
	/*@Column(name="nome", nullable=false, length=72)*/
	private String nome;
	
	public int getEscode() {
		return escode;
	}

	public void setEscode(int escode) {
		this.escode = escode;
	}

	public String getSigla() {
		return sigla;
	}

	public void setSigla(String sigla) {
		this.sigla = sigla;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + escode;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Estado other = (Estado) obj;
		if (escode != other.escode)
			return false;
		return true;
	}
}
